var phonecatApp = angular.module("phonecatApp", ["ngRoute","ngAnimate"]);
angular.
  module('phonecatApp').
  config(['$locationProvider', '$routeProvider',
    function config($locationProvider, $routeProvider) {
      $locationProvider.hashPrefix('!');

      $routeProvider.
        when('/phones', {
          template: '<phone-list></phone-list>'
        }).
        when('/phones/:phoneId', {
          template: '<phone-detail></phone-detail>'
        }).
        otherwise('/phones');
    }
  ]);
var phonecatApp=angular.module("phonecatApp");

phonecatApp.filter("checkmark",function(){
    return function(input){
        return input+" checkmark";
    }
})

  var phonecatApp=angular.module("phonecatApp");

  function PhoneDetailController($routeParams,$scope){
      $scope.phoneId=$routeParams.phoneId;
  }

  phonecatApp.component("phoneDetail",{
      templateUrl:"/js/components/phone-detail/phone-detail.template.html",
      controller:["$routeParams","$scope",PhoneDetailController]
  })
var phonecatApp=angular.module('phonecatApp');
function PhoneListController($scope){
    $scope.phones = [
        {
          name: 'Nexus S',
          snippet: 'Fast just got faster with Nexus S.',
          id:10
        }, {
          name: 'Motorola XOOM™ with Wi-Fi',
          snippet: 'The Next, Next Generation tablet.',
          id:12
        }, {
          name: 'MOTOROLA XOOM™',
          snippet: 'The Next, Next Generation tablet.',
          id:13
        }
      ];
}


phonecatApp.component("phoneList",{
    templateUrl:"/js/components/phone-list/phone-list.template.html",
    controller:["$scope",PhoneListController]
});

